Skip to content

refactor(conversations): read the conversation types from the server - #6650

Open
AndyScherzinger wants to merge 2 commits into
bugfix/noid/conversationCreationParametersfrom
refactor/noid/conversationPresetsEndpoint
Open

refactor(conversations): read the conversation types from the server#6650
AndyScherzinger wants to merge 2 commits into
bugfix/noid/conversationCreationParametersfrom
refactor/noid/conversationPresetsEndpoint

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

The conversation type cards were hardcoded, so which types an installation offers, the parameters
they apply and the values an administrator configured as the default were all ignored.
docs/capabilities.md describes conversation-presets as "should be used by clients", so the list
now comes from GET /ocs/v2.php/apps/spreed/api/v1/presets/room and the grid renders whatever it
reports. A type the server adds needs no app change beyond an icon and a label.

Parameters are applied in the order the server documents: the administrator configured defaults,
then the selected type, then the parameters the user chose. Selecting a type drops the user's choices
for the parameters that type defines, so a type can still configure the visibility of a conversation.

The hardcoded parameter table from the previous PR is deleted; only its shape survives, which was the
point of introducing it there.

This PR is stacked on #6649 and targets its branch, not master. GitHub retargets it to master
once that one merges. The three missing conversation types (webinar, presentation, classified) follow
in the next PR on top of this one.

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • screenshots in light and dark, and with a non-default server primary colour

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

Capabilities checked: conversation-presets gates the whole section, announcement-preset plus the
administrator check gate the announcement type. The presets endpoint is API v1 by its own route
definition, unlike the v4 room endpoints.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🤖 Generated with Claude Code

https://claude.ai/code/session_014YnDswTbCmRrVETnwE4twB

@AndyScherzinger
AndyScherzinger force-pushed the refactor/noid/conversationPresetsEndpoint branch from ac1ee9b to 11427d7 Compare September 4, 2026 18:29
@AndyScherzinger AndyScherzinger added enhancement New feature or request 3. to review Waiting for reviews AI assisted labels Sep 4, 2026
@AndyScherzinger
AndyScherzinger force-pushed the bugfix/noid/conversationCreationParameters branch from eb2dcca to b6bd25c Compare September 5, 2026 06:39
@AndyScherzinger
AndyScherzinger force-pushed the refactor/noid/conversationPresetsEndpoint branch from 11427d7 to 094f236 Compare September 5, 2026 06:39
The conversation type cards were hardcoded, so the presets an installation
offers, the parameters they apply and the values an administrator configured as
the default were all ignored. They now come from the presets endpoint, and the
grid renders whatever it reports.

Parameters are applied in the documented order: the administrator configured
defaults, then the selected type, then the parameters the user chose. Selecting
a type drops the choices the user made for the parameters that type defines, so
a type can still configure the visibility of a conversation.

Assisted-by: Claude Code:claude-opus-5
Claude-Session: https://claude.ai/code/session_014YnDswTbCmRrVETnwE4twB
Signed-off-by: Andy Scherzinger <[email protected]>
CapabilitiesUtil.isAdmin read config => conversations => is-admin, a capability
the server does not publish, so it always returned false. Its last caller is
gone now that the presets endpoint decides which conversation types a user is
offered.

Assisted-by: Claude Code:claude-opus-5
Claude-Session: https://claude.ai/code/session_014YnDswTbCmRrVETnwE4twB
Signed-off-by: Andy Scherzinger <[email protected]>
@AndyScherzinger
AndyScherzinger force-pushed the bugfix/noid/conversationCreationParameters branch from b6bd25c to 0d12eca Compare September 5, 2026 10:47
@AndyScherzinger
AndyScherzinger force-pushed the refactor/noid/conversationPresetsEndpoint branch from 094f236 to 2b80ea9 Compare September 5, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant